package com.ocom.payconfig.dao;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ocom.common.entity.card.EntityXfMealInfo;
import com.ocom.common.entity.card.EntityXfMealTime;
import com.ocom.common.vo.payconfig.GetOrderForecastMealNoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IDaoXfMealTime extends BaseMapper<EntityXfMealTime> {
    @Select("select  xt.* ,xi.meal_name " +
            "from xf_meal_time  xt  " +
            "left  join  xf_meal_info  xi  on  xt.com_id=xi.com_id  and  xt.meal_no=xi.meal_no ${ew.customSqlSegment}")
    List<EntityXfMealTime> getList(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select i.*,t.advance_money from  xf_meal_info i left join xf_meal_time t  on i.com_id =t.com_id  and  i.meal_no=t.meal_no ${ew.customSqlSegment}")
    List<GetOrderForecastMealNoVo> getOrderForecastMealNo(@Param(Constants.WRAPPER) Wrapper wrapper);
}
